// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import { Button } from 'vant';

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(Button);

Vue.use(VueAxios, axios);

// axios.defaults.baseURL = "http://localhost:8081/api";

//配置请求头
axios.defaults.headers.common['Authorization'] = 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjUwOTE1YmJjLWY1YzEtNDY3Mi05MjJkLWJhNjFlOGE5YmIwYiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.NKbjM0doVg0R02MyWEpCFKOFAC2AJcnmLSX-q3qit_275NP1tUNZQTgfLjcmeLrRNuHYPI63jF3Wqcn2nF9MgQ';
Vue.config.productionTip = false
Vue.prototype.$axios = axios
// step2：使每次请求都会带一个 /api 前缀
axios.defaults.baseURL = '/'

Vue.prototype.$key='e8e9d0fa9937b15b659ea3d04a667505';
Vue.prototype.$cod='132ca78ec077ab05d822bbddef443d57';
/* eslint-disable no-new */
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
